infissa(X+Y):-infissa(X),write(+),infissa(Y).
infissa(X-Y):-infissa(X),write(-),infissa(Y).
infissa(X*Y):-infissa(X),write(*),infissa(Y).
infissa(X/Y):-infissa(X),write(/),infissa(Y).
infissa([X]):-write('('),infissa(X),write(')').
infissa(-X):-write(-),infissa(X).
infissa(sin(X)):-write('sin('),infissa(X),write(')').
infissa(cos(X)):-write('cos('),infissa(X),write(')').
infissa(T):-write(T).


